package com.teamb6.shop.service.impl;

import com.teamb6.shop.domain.Comment;
import com.teamb6.shop.domain.CommentExample;
import com.teamb6.shop.mapper.CommentMapper;
import com.teamb6.shop.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired(required = false)
    private CommentMapper commentMapper;

    //增加商品评论
    @Override
    public void insertSelective(Comment comment) {
        commentMapper.insertSelective(comment);
    }

   //展示评论
   @Override
   public List<Comment> selectByExample(CommentExample commentExample) {
       return commentMapper.selectByExample(commentExample);
   }
}
